package cn.stylefeng.guns.sys.modular.system.mapper;

import cn.stylefeng.guns.base.pojo.node.ZTreeNode;
import cn.stylefeng.guns.sys.modular.system.entity.Dict;
import cn.stylefeng.guns.sys.modular.system.model.params.DictParam;
import cn.stylefeng.guns.sys.modular.system.model.result.DictResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 基础字典 Mapper 接口
 * </p>
 *
 * @author stylefeng
 * @since 2019-03-13
 */
public interface DictMapper extends BaseMapper<Dict> {

    /**
     * 获取ztree的节点列表
     */
    List<ZTreeNode> dictTree(@Param("dictTypeId") Long dictTypeId);

    List<ZTreeNode> dictTree2(@Param("dictTypeId") Long dictTypeId);

    List<ZTreeNode> dictTree3(@Param("dictTypeId")Long dictTypeId);
    /**
     * where parentIds like ''
     */
    List<Dict> likeParentIds(@Param("dictId") Long dictId);


	List<DictResult> findByDicttypeCodeAndDictCode3(@Param("code")String code,@Param("dictcode")String dictcode);

	List<DictResult> findByDicttypeCode2(@Param("code")String code);

	List<DictResult> findByDicttypeCode2And0(@Param("code")String code,@Param("parentId")Long parentId);

	DictResult findBySpec(@Param("paramCondition")DictParam paramCondition);

    List<DictResult> findByDictId(@Param("goodsBigType")Long  goodsBigType);

	List<ZTreeNode> treeByBySpec(@Param("paramCondition")DictParam dictParam);

	List<ZTreeNode> treeByBySpec2(@Param("paramCondition")DictParam dictParam);

    List<DictResult> getDictListByType(@Param("code")String code);
}
